package com.carboy.launch.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DbHelper extends SQLiteOpenHelper {

	private static String Db_Name = "wifi.db";
	private static int Db_Version = 1;

	public DbHelper(Context context) {
		super(context, Db_Name, null, Db_Version);
	}

	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE TABLE IF NOT EXISTS wifiConfig"
				+ "(ssid NVARCHAR, password NVARCHAR, mode CHAR(1))");
	}

	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
		db.execSQL("DROP TABLE IF EXISTS wifiConfig");
		onCreate(db);
	}

}
